#include<stdio.h>
#include<stdlib.h>
#include "QStack.h"

void converse( int N ){
	QStype *qs = ( QStype* ) malloc( sizeof( QStype ) );
	if( qs == NULL ){
		printf( "Space malloc failed" );
		return;
	}

	initiateQStack( qs );

	while( N ){
		if( !pushQStack( qs, N%8 ) ){
			printf( "statck is full\n" );
			return;
		}
		N = N /8;
      	}
	
	int a;
	while( qs->top != -1 ){
		popQStack( qs, &a );
		printf( "%d", a );
	}
}

int main( ){
	converse( 100 );
}
